<?php
	require_once('../../auth.php');

?>
			
			
			
<html>
<head>
<script language="javascript">
location.replace("../../adminhome.php")

</script>

</head>
<body>
<?php
/*file no 1
*/


$img1t=$_FILES["file1"]["size"];
$img2t=$_FILES["file2"]["size"];
$img3t=$_FILES["file3"]["size"];
$img4t=$_FILES["file4"]["size"];
$img5t=$_FILES["file5"]["size"];
$img6t=$_FILES["file6"]["size"];
$img7t=$_FILES["file7"]["size"];
$img8t=$_FILES["file8"]["size"];
$img9t=$_FILES["file9"]["size"];
$img10t=$_FILES["file10"]["size"];


$imgname1t=$_FILES["file1"]["name"];
$imgname2t=$_FILES["file2"]["name"];
$imgname3t=$_FILES["file3"]["name"];
$imgname4t=$_FILES["file4"]["name"];
$imgname5t=$_FILES["file5"]["name"];
$imgname6t=$_FILES["file6"]["name"];
$imgname7t=$_FILES["file7"]["name"];
$imgname8t=$_FILES["file8"]["name"];
$imgname9t=$_FILES["file9"]["name"];
$imgname10t=$_FILES["file10"]["name"];

if(($_FILES["file1"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file1"]["name"];

if ((($_FILES["file1"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file1"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file1"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file1"]["name"] . "<br />";
    echo "Type: " . $_FILES["file1"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file1"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file1"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file1"]["name"]))
      {
		  
/*     echo $_FILES["file"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file1"]["tmp_name"],
      "tmp/" . $_FILES["file1"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file1"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}
?> 


<?php
/*file no 2*/


if(($_FILES["file2"]["size"])>0)
{
$img="tmp/";
$img.=$_FILES["file2"]["name"];
if ((($_FILES["file2"]["type"] == "image/jpeg")

/*|| ($_FILES["file2"]["type"] == "image/gif")
|| ($_FILES["file2"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file2"]["name"] . "<br />";
    echo "Type: " . $_FILES["file2"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file2"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file2"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file2"]["name"]))
      {
		  
/*     echo $_FILES["file2"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file2"]["tmp_name"],
      "tmp/" . $_FILES["file2"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file2"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
}

?> 


<?php
/*file no 3*/


if(($_FILES["file3"]["size"])>0)
{
$img="tmp/";
$img.=$_FILES["file3"]["name"];

if ((($_FILES["file3"]["type"] == "image/jpeg")
/*|| ($_FILES["file3"]["type"] == "image/gif")
|| ($_FILES["file3"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file3"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file3"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file3"]["name"] . "<br />";
    echo "Type: " . $_FILES["file3"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file3"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file3"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file3"]["name"]))
      {
		  
/*     echo $_FILES["file3"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file3"]["tmp_name"],
      "tmp/" . $_FILES["file3"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file3"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
}


/* file no 4 */

if(($_FILES["file4"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file4"]["name"];

if ((($_FILES["file4"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file4"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file4"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file4"]["name"] . "<br />";
    echo "Type: " . $_FILES["file4"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file4"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file4"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file4"]["name"]))
      {
		  
/*     echo $_FILES["file"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file4"]["tmp_name"],
      "tmp/" . $_FILES["file4"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file4"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}

/* file no 5 */

if(($_FILES["file5"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file5"]["name"];

if ((($_FILES["file5"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file5"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file5"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file5"]["name"] . "<br />";
    echo "Type: " . $_FILES["file5"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file5"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file5"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file5"]["name"]))
      {
		  
/*     echo $_FILES["file"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file5"]["tmp_name"],
      "tmp/" . $_FILES["file5"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file5"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}


/* file no 6 */

if(($_FILES["file6"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file6"]["name"];

if ((($_FILES["file6"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file6"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file6"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file6"]["name"] . "<br />";
    echo "Type: " . $_FILES["file6"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file6"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file6"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file6"]["name"]))
      {
		  
/*     echo $_FILES["file"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file6"]["tmp_name"],
      "tmp/" . $_FILES["file6"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file6"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}

/* file no 7 */


if(($_FILES["file7"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file7"]["name"];

if ((($_FILES["file7"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file7"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file7"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file7"]["name"] . "<br />";
    echo "Type: " . $_FILES["file7"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file7"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file7"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file7"]["name"]))
      {
		  
/*     echo $_FILES["file7"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file7"]["tmp_name"],
      "tmp/" . $_FILES["file7"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file7"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}


/* file no 8*/

if(($_FILES["file8"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file8"]["name"];

if ((($_FILES["file8"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file8"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file8"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file8"]["name"] . "<br />";
    echo "Type: " . $_FILES["file8"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file8"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file8"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file8"]["name"]))
      {
		  
/*     echo $_FILES["file8"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file8"]["tmp_name"],
      "tmp/" . $_FILES["file8"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file8"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}


/* file no 9 */

if(($_FILES["file9"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file9"]["name"];

if ((($_FILES["file9"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file9"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file9"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file9"]["name"] . "<br />";
    echo "Type: " . $_FILES["file9"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file9"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file9"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file9"]["name"]))
      {
		  
/*     echo $_FILES["file9"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file9"]["tmp_name"],
      "tmp/" . $_FILES["file9"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file9"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}


/* file no 10 */

if(($_FILES["file10"]["size"])>0)
{ 
      /*      unlink("1.jpg");	
            unlink("tmp/1.jpg");*/
$img="tmp/";
$img.=$_FILES["file10"]["name"];

if ((($_FILES["file10"]["type"] == "image/jpeg")
/*|| ($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/pjpeg")*/)
)
  {
  if ($_FILES["file10"]["error"] > 0)
    {
    echo "Return Code: " . $_FILES["file10"]["error"] . "<br />";
    }
  else
    {
    echo "Upload: " . $_FILES["file10"]["name"] . "<br />";
    echo "Type: " . $_FILES["file10"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file10"]["size"] / 1024) . " Kb<br />";
    echo "Temp file: " . $_FILES["file10"]["tmp_name"] . "<br />";

    if (file_exists("tmp/" . $_FILES["file10"]["name"]))
      {
		  
/*     echo $_FILES["file10"]["name"] . " already exists. ";
*/      }
    else
      {
      move_uploaded_file($_FILES["file10"]["tmp_name"],
      "tmp/" . $_FILES["file10"]["name"]);
      echo "Stored in: " . "tmp/" . $_FILES["file10"]["name"];
      }
    }
  }
else
  {
  echo "Invalid file";
  }
echo $a ."success";
}


?> 
<?php
include('../include.php');
   $image = new SimpleImage();


if($img1t>0)
{
/* no 1*/
 $new="scroll/";
$new.=$imgname1t;
$add="tmp/";
$add.=$imgname1t;
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/1.jpg");
   unlink($add);
}

if($img2t>0)
{

/*no 2*/

$new="scroll/";
$new.=$imgname2t;
$add="tmp/";
$add.=$imgname2t;
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/2.jpg");
   unlink($add);
}
if($img3t>0)
{
$new="scroll/";
$new.=$imgname3t;
$add="tmp/";
$add.=$imgname3t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/3.jpg");
   unlink($add);
}
if($img4t>0)
{
$new="scroll/";
$new.=$imgname4t;
$add="tmp/";
$add.=$imgname4t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/4.jpg");
   unlink($add);
}

if($img5t>0)
{
$new="scroll/";
$new.=$imgname5t;
$add="tmp/";
$add.=$imgname5t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/5.jpg");
   unlink($add);
}

if($img6t>0)
{
$new="scroll/";
$new.=$imgname6t;
$add="tmp/";
$add.=$imgname6t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/6.jpg");
   unlink($add);
}

if($img7t>0)
{
$new="scroll/";
$new.=$imgname7t;
$add="tmp/";
$add.=$imgname7t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/7.jpg");
   unlink($add);
}

if($img8t>0)
{
$new="scroll/";
$new.=$imgname8t;
$add="tmp/";
$add.=$imgname8t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/8.jpg");
   unlink($add);
}

if($img9t>0)
{
$new="scroll/";
$new.=$imgname9t;
$add="tmp/";
$add.=$imgname9t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/9.jpg");
   unlink($add);
}

if($img10t>0)
{
$new="scroll/";
$new.=$imgname10t;
$add="tmp/";
$add.=$imgname10t;
   
   $image->load($add);
   $image->resize(113,87);
   $image->save($new);
   rename($new,"scroll/10.jpg");
   unlink($add);
}
?>

</body>
</html>